return NULL;
}
+ /* Extension stylesheet */
+ stylesheet->app_data = GUINT_TO_POINTER (FALSE);
+
return stylesheet;
}
if (!stylesheet)
return FALSE;
+ stylesheet->app_data = GUINT_TO_POINTER (TRUE);
+
insert_stylesheet (theme, path, stylesheet);
cr_stylesheet_ref (stylesheet);
theme->custom_stylesheets = g_slist_prepend (theme->custom_stylesheets, stylesheet);
/* g_ptr_array_sort() is broooken */
CRDeclaration *decl_a = *(CRDeclaration **) a;
CRDeclaration *decl_b = *(CRDeclaration **) b;
+ gboolean a_is_extension_sheet, b_is_extension_sheet;
int origin_a = get_origin (decl_a);
int origin_b = get_origin (decl_b);
if (decl_a->parent_statement->specificity != decl_b->parent_statement->specificity)
return decl_a->parent_statement->specificity - decl_b->parent_statement->specificity;
+ a_is_extension_sheet = GPOINTER_TO_UINT (decl_a->parent_statement->parent_sheet->app_data);
+ b_is_extension_sheet = GPOINTER_TO_UINT (decl_b->parent_statement->parent_sheet->app_data);
+
+ if (a_is_extension_sheet != b_is_extension_sheet)
+ return a_is_extension_sheet ? 1 : -1;
+
return 0;
}